Precise and Scalable Detection of Double-Fetch Bugs in OS Kernels

نویسندگان

  • Meng Xu
  • Chenxiong Qian
  • Kangjie Lu
  • Michael Backes
  • Taesoo Kim
چکیده

During system call execution, it is common for operating system kernels to read userspace memory multiple times (multi-reads). A critical bug may exist if the fetched userspace memory is subject to change across these reads, i.e., a race condition, which is known as a double-fetch bug. Prior works have attempted to detect these bugs both statically and dynamically. However, due to their improper assumptions and imprecise definitions regarding double-fetch bugs, their multiread detection is inherently limited and suffers from significant false positives and false negatives. For example, their approach is unable to support device emulation, inter-procedural analysis, loop handling, etc. More importantly, they completely leave the task of finding real double-fetch bugs from the haystack of multireads to manual verification, which is expensive if possible at all. In this paper, we first present a formal and precise definition of double-fetch bugs and then implement a static analysis system— DEADLINE—to automatically detect double-fetch bugs in OS kernels. DEADLINE uses static program analysis techniques to systematically find multi-reads throughout the kernel and employs specialized symbolic checking to vet each multi-read for double-fetch bugs. We apply DEADLINE to Linux and FreeBSD kernels and find 23 new bugs in Linux and one new bug in FreeBSD. We further propose four generic strategies to patch and prevent double-fetch bugs based on our study and the discussion with kernel maintainers.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

How Double-Fetch Situations turn into Double-Fetch Vulnerabilities: A Study of Double Fetches in the Linux Kernel

We present the first static approach that systematically detects potential double-fetch vulnerabilities in the Linux kernel. Using a pattern-based analysis, we identified 90 double fetches in the Linux kernel. 57 of these occur in drivers, which previous dynamic approaches were unable to detect without access to the corresponding hardware. We manually investigated the 90 occurrences, and inferr...

متن کامل

Automated Detection, Exploitation, and Elimination of Double-Fetch Bugs using Modern CPU Features

Double-fetch bugs are a special type of race condition, where an unprivileged execution thread is able to change a memory location between the time-of-check and time-of-use of a privileged execution thread. If an unprivileged attacker changes the value at the right time, the privileged operation becomes inconsistent, leading to a change in control flow, and thus an escalation of privileges for ...

متن کامل

My Current Work on CertiKOS

My research goal is to make critical software systems truly reliable and secure through formal verification. As the backbone of modern software systems, operating system (OS) kernels have great impacts on the reliability and security of today’s computing hosts. OS kernels, however, are complicated, highly concurrent, and prone to bugs. For the past several years, my research has focused on inve...

متن کامل

Finding Bugs in Open Source Kernels using Parfait

Parfait is a static bug checking tool for C/C++ source code, which is designed to be both scalable and precise. Requirements for this tool were derived from interaction with the Solaris operating system team, where it was required to check millions of lines of code in a time-efficient manner, with minimal noise and a low cost of integration into the build process. This paper gives an overview o...

متن کامل

Double Sandwich ELISA Modified Method for the Detection of Clostridium Botulinum Type E

Background & Objective: A very small amount of botulinum toxin can cause death and on the other hand, there is no cure for its poison other than antitoxin. Therefore, a diagnostic method that can detect very small amounts of botulinum toxin in a short time is very important. In this study, rapid and accurate detection of botulinum toxin type E has been performed with the double sandwich ELISA m...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2018